package com.metacube.questionbank.service;

import java.util.List;

import com.metacube.questionbank.model.Question;
import com.metacube.questionbank.model.Tag;

/*
 * @author Team Neeraj Jain
 * */
public interface TagService {

	/*
	 * This method returns all the tags that are in the database.
	 * 
	 * @return list of tags
	 */
	public List<Tag> getTags();

	/*
	 * @param tagId id of tag This method returns a list of questions that are
	 * related to a particular tag
	 * 
	 * @return list of questions.
	 */
	public List<Question> getTagQuestions(int tagId);

	/*
	 * @param tagName name of tag This method returns a list of tags according
	 * to the string that is typed by user in the search bar of tag page.
	 * 
	 * @return list of tag
	 */
	public List<Tag> getMatchedTag(String tagName);

	/*
	 * @param questions list of questions This method returns a list that
	 * contains a list of tags.For each question it adds a list of tags to the
	 * list and then it returns that list.
	 * 
	 * @return list of tag lists
	 */
	public List<List<Tag>> getQuestionTags(List<Question> questions);

	/*
	 * @param quesId id of question This method returns a list of tags
	 * associated with a particular question
	 * 
	 * @return list of tags.
	 */
	public List<Tag> getQuestionTags(int quesId);

	/*
	 * @param query string written by user This method returns a list of tag
	 * names that starts with the query written by the user
	 * 
	 * @return list of tag names.
	 */
	public List<String> getMatchedTagsList(String query);

	/*
	 * @param objTag object of Tag class This method inserts a tag in the
	 * database
	 */
	public void insertTag(Tag objTag);

	/*
	 * @param tagName name of tag
	 * 
	 * @param quesId id of question This method associates tags with the
	 * question if that tag exists in the tags that are stored in database.
	 */
	public void insertQuestionTags(String tagName, int quesId);

}
